/*
 * @Descripttion: 物料清单
 * @version: V1.0
 * @Author: GaoWei
 * @Date: 2021-04-25 12:11:55
 * @LastEditors: GaoWei
 * @LastEditTime: 2021-07-13 16:27:46
 */
import { axios } from '../../utils/request'

/**
 * 物料清单
 */
const api = {
    save: '/bom/save',
    pageList: '/bom/getList',
    delete: '/bom/delete',
    details: '/bom/getChildBomList',
    examine: '/bom/examine',

    groupList: '/bomGroup/getList',  //分组列表
    groupDelete: '/bomGroup/delete', //分组删除
    groupSave: '/bomGroup/save',     //分组保存
}

/**
 * 保存
 */
export function save(data) {
    return axios({
        url: api.save,
        method: "post",
        data: data
    })
}

/**
 * 列表
 */
export function list(data) {
    return axios({
        url: api.pageList,
        method: "get",
        params: data
    })
}

/**
 * 删除
 */
export function remove(data) {
    return axios({
        url: api.delete,
        method: "DELETE",
        params: data
    })
}

/**
 * 明细
 */
export function details(data) {
    return axios({
        url: api.details,
        method: "GET",
        params: data
    })
}

/**
 * 审核
 */
export function examine(data) {
    return axios({
        url: api.examine,
        method: "GET",
        params: data
    })
}

export function groupList(data) {
    return axios({
        url: api.groupList,
        method: "GET",
        params: data
    })
}

export function groupDelete(data) {
    return axios({
        url: api.groupDelete,
        method: "DELETE",
        params: data
    })
}
export function groupSave(data) {
    return axios({
        url: api.groupSave,
        method: "post",
        data: data
    })
}